<template>
  <div class="custom_header">
    <span class="title_text">{{ title }}</span>

    <el-button type="primary"
               @click="goback"
               class="el-icon-back"
               v-if="title!=='巡检任务管理'&&title!=='巡检场景管理'">返回</el-button>

    <!-- <ul class="list"
        v-if="title==='巡检场景管理'||title==='巡检任务管理'">
      <li v-for="item in 6"
          :key="item">
        <i class="el-icon-s-opportunity"></i>
        <span v-if="title==='巡检场景管理'">有新的场景上传，请尽快同步信息！</span>
        <span v-else-if="title==='巡检任务管理'">有新的任务上传，请尽快同步信息！</span>
        <span>2022-12-19 10:45:06</span>
        <i class="el-icon-arrow-right"
           @click="deleteRow()"></i>
      </li>
    </ul> -->
  </div>
</template>

<script>
export default {
  name: "CustomHeader",
  props: {
    title: {
      type: String,
      default: ""
    }
  },
  methods: {
    deleteRow () {
      this.$emit('synchronization')
    },
    goback () {
      this.$router.back()
    },
  }
}
</script>

<style lang="scss" scoped>
.custom_header {
  padding: 0 20px;
  height: 54px;
  border-bottom: 1px solid #e6e6e6;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  .title_text {
    font-size: 16px;
    color: rgba(0, 0, 0, 0.85);
    font-weight: bold;
  }
  .el-icon-back {
    letter-spacing: 5px;
  }
  // .list {
  //   width: 453px;
  //   height: 50px;
  //   padding: 0 10px;
  //   overflow: auto;
  //   background: linear-gradient(
  //     180deg,
  //     rgba(255, 86, 0, 0.05) 0%,
  //     rgba(255, 86, 0, 0) 100%
  //   );
  //   li {
  //     padding: 14px 0;
  //     border-bottom: 1px solid #e6e6e6;
  //     .el-icon-arrow-right {
  //       margin-left: 14px;
  //     }
  //   }
  // }
}

// /deep/ .el-icon-s-opportunity {
//   background: red;
//   -webkit-background-clip: text;
//   color: transparent;
// }
</style>
